package com.kgc.scd.service;

import com.kgc.scd.bean.ShopAddress;
import com.kgc.scd.bean.ShopUser;
import com.kgc.scd.util.RequestResult;
import com.kgc.scd.vo.ShopAddressVO;
import com.kgc.scd.vo.ShopUserVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created On : 2022/11/16.
 * <p>
 * Author : 刘慧枫
 * <p>
 * Description: web端个人资料修改业务接口
 */
@FeignClient(value = "wyyxmall-j-l-t-server")
public interface WebModifyShopUserService {

    /**
     * @author : 刘慧枫
     * @date   : 2022/11/17
     * @param  : [gender, birthday, nickname, shopUser]
     * @return : com.kgc.scd.util.RequestResult<com.kgc.scd.bean.ShopUser>
     * @description : 基于feign远程调用wyyxmall-lhf-server服务端 修改个人资料
     */
    @PostMapping("/modUserInfo")
    RequestResult<ShopUserVO> modUserInfoUseFeign(@RequestParam(value = "gender",required = false) Integer gender,
                                                  @RequestParam(value = "birthday",required = false) Date birthday,
                                                  @RequestParam(value = "nickname",required = false) String nickname,
                                                  @RequestParam(value = "headImg",required = false) String headImg,
                                                  @RequestBody ShopUser shopUser);

    /**
     * @author : 刘慧枫
     * @date   : 2022/11/17
     * @param  : [userOldPwd, userNewPwd, verifyUserNewPwd, shopUser]
     * @return : com.kgc.scd.util.RequestResult<java.util.Map<java.lang.String,java.lang.Object>>
     * @description : 基于feign远程调用wyyxmall-lhf-server服务端 修改密码
     */
    @PostMapping("/modUserPwd")
    RequestResult<Map<String,Object>> modUserPwdUseFeign(@RequestParam("userOldPwd") String userOldPwd,
                                                         @RequestParam("userNewPwd") String userNewPwd,
                                                         @RequestParam("verifyUserNewPwd") String verifyUserNewPwd,
                                                         @RequestBody ShopUser shopUser);

    /**
     * @author : 刘慧枫
     * @date   : 2022/11/17
     * @param  : [name, address, mobile, shopUser]
     * @return : com.kgc.scd.util.RequestResult<com.kgc.scd.bean.ShopAddress>
     * @description : 基于feign远程调用wyyxmall-lhf-server服务端 添加个人地址
     */
    @PostMapping("/addUserAddress")
    RequestResult<ShopAddressVO> addUserAddressUseFeign(@RequestParam("name") String name,
                                                        @RequestParam("address") String address,
                                                        @RequestParam("mobile") String mobile,
                                                        @RequestParam("status") Integer status,
                                                        @RequestBody ShopUser shopUser);

    /**
     * @author : 刘慧枫
     * @date   : 2022/11/23
     * @param  : [shopAddress]
     * @return : com.kgc.scd.util.RequestResult<com.kgc.scd.vo.ShopAddressVO>
     * @description : 基于feign远程调用wyyxmall-lhf-server服务端 修改个人地址
     */
    @PostMapping("/modUserAddress")
    RequestResult<ShopAddressVO> modUserAddress(@RequestBody ShopAddress shopAddress);

    /**
     * @author : 刘慧枫
     * @date   : 2022/11/23
     * @param  : [shopAddress]
     * @return : com.kgc.scd.util.RequestResult<com.kgc.scd.vo.ShopAddressVO>
     * @description : 基于feign远程调用wyyxmall-lhf-server服务端 删除个人地址
     */
    @GetMapping("/delUserAddress")
    RequestResult<String> delUserAddress(@RequestParam("ids") List<String> ids);
}
